/*
 * Copyright © 2011 Nokia Corporation. All rights reserved.
 * Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation. 
 * Oracle and Java are trademarks or registered trademarks of Oracle and/or its
 * affiliates. Other product and company names mentioned herein may be trademarks
 * or trade names of their respective owners. 
 * See LICENSE.TXT for license information.
 */ 

package com.nokia.example.wordpress.components;

import java.util.Vector;
import javax.microedition.lcdui.Graphics;

/**
 * Interface for drawing a row in a list.
 */
public interface ListDrawer {

    /**
     * Returns the height of one list item (ie. row) in pixels.
     * @return
     */
    public int itemHeight();

    /**
     * Draws one item.
     * @param data Data vector
     * @param g Graphics context to use for drawing
     * @param itemIndex Item to draw from the data vector
     * @param x Top left x coordinate of the drawing area
     * @param y Top left y coordinate of the drawing area
     * @param width Width of the drawing area
     * @param height Height of the drawing area
     * @param focused true if this item is currently focused (ie. a highlight is required)
     */
    public void drawItem(Vector data, Graphics g, int itemIndex, int x, int y, int width, int height, boolean focused);
}
